<template>
  <div>
    <div>{{ count }}</div>
    <el-button @click="count++">点击role</el-button>
  </div>
</template>

<script setup lang="ts">
import { onActivated, onDeactivated, ref } from 'vue'

const count = ref<number>(0)

onActivated(() => {
  console.log('count.value', count.value)
})
onDeactivated(() => {
  console.log('count.value', count.value)
})
</script>

<style scoped></style>
